package org.xtext.example.generator;

import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.generator.IFileSystemAccess;

@SuppressWarnings("all")
public class GenUtils {
  private IFileSystemAccess curFsa;
  
  private Resource resource;
  
  public IFileSystemAccess setFsa(final IFileSystemAccess fsa) {
    IFileSystemAccess _curFsa = this.curFsa = fsa;
    return _curFsa;
  }
  
  public IFileSystemAccess getFsa() {
    return this.curFsa;
  }
  
  public Resource setResource(final Resource res) {
    Resource _resource = this.resource = res;
    return _resource;
  }
  
  public Resource getResource() {
    return this.resource;
  }
  
  public void genFile(final String name, final String suffix, final CharSequence contents) {
    String sysName = name.replace(".", "/");
    String _applicationDirName = this.applicationDirName();
    String _plus = (_applicationDirName + "/");
    String _plus_1 = (_plus + sysName);
    String _plus_2 = (_plus_1 + ".");
    String fName = (_plus_2 + suffix);
    this.curFsa.generateFile(fName, contents);
  }
  
  public String applicationDirName() {
    return "";
  }
  
  public String applicationPackageName() {
    return "";
  }
  
  public CharSequence genLogo() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("/*");
    _builder.newLine();
    _builder.append(" ");
    _builder.append("* --------------------------------------");
    _builder.newLine();
    _builder.append(" ");
    _builder.append("* Generated by AN");
    _builder.newLine();
    _builder.append(" ");
    _builder.append("* --------------------------------------");
    _builder.newLine();
    _builder.append(" ");
    _builder.append("*/");
    _builder.newLine();
    return _builder;
  }
}
